export type Language = 'zh-CN' | 'en'

type TranslationKeys = {
  title: string
  tabs: string[]
  language: string
  // TikTok组件相关翻译
  tiktok: {
    placeholder: string
    generateBtn: string
    copyBtn: string
    downloadBtn: string
  }
  // 微言威语组件
  weiyan: {
    placeholder: string
    generateBtn: string
    copyBtn: string
    downloadBtn: string
  }
  // 图片搜索组件
  imageSearch: {
    uploadTitle: string
    dragText: string
    uploadBtn: string
    searchBtn: string
  }
  // 语音合成组件
  createAudio: {
    placeholder: string
    generateBtn: string
    playBtn: string
    downloadBtn: string
    voiceOptions: {
      male: string
      female: string
    }
  }
  // 视频创作组件
  videoLipSync: {
    uploadTitle: string
    generateBtn: string
    previewBtn: string
    downloadBtn: string
  }
  // 小红书配图
  poster: {
    UploadImage: string
    CompanyGallery: string
    AddText: string
    PleaseEnterText: string
    KeepAtLeastOne: string
    delete: string
    AddTextBox: string
    GenerateImages: string
    noneInput: string
    DownloadImages: string
  }
  // 通用按钮和提示文本
  common: {
    loading: string
    success: string
    error: string
    retry: string
    cancel: string
    confirm: string
  }
}

type Translations = {
  [key in Language]: TranslationKeys
}

export const translations: Translations = {
  'zh-CN': {
    title: 'VERTU AIGC',
    tabs: ['微言威语', '图文创作', '图片搜索', '语音合成', '视频创作'],
    language: '简体中文',
    tiktok: {
      placeholder: '请输入内容...',
      generateBtn: '生成',
      copyBtn: '复制',
      downloadBtn: '下载',
    },
    weiyan: {
      placeholder: '请输入您想要转换的文字...',
      generateBtn: '开始生成',
      copyBtn: '复制内容',
      downloadBtn: '下载结果',
    },
    imageSearch: {
      uploadTitle: '上传图片',
      dragText: '拖拽图片到此处或点击上传',
      uploadBtn: '选择图片',
      searchBtn: '开始搜索',
    },
    createAudio: {
      placeholder: '请输入要转换的文字内容...',
      generateBtn: '生成语音',
      playBtn: '播放',
      downloadBtn: '下载音频',
      voiceOptions: {
        male: '男声',
        female: '女声',
      },
    },
    videoLipSync: {
      uploadTitle: '上传视频',
      generateBtn: '生成视频',
      previewBtn: '预览',
      downloadBtn: '下载视频',
    },
    poster: {
      UploadImage: '上传图片',
      CompanyGallery: '公司图库',
      AddText: '添加文字',
      PleaseEnterText: '请输入文字',
      KeepAtLeastOne: '至少保留一个',
      delete: '删除',
      AddTextBox: '添加文本框',
      GenerateImages: '生成图片',
      noneInput: '有未填写的文字',
      DownloadImages: '下载图片',
    },
    common: {
      loading: '加载中...',
      success: '操作成功',
      error: '发生错误',
      retry: '重试',
      cancel: '取消',
      confirm: '确认',
    },
  },
  en: {
    title: 'VERTU AIGC',
    tabs: ['Micro Blog', 'Content Creation', 'Image Search', 'Voice Synthesis', 'Video Creation'],
    language: 'English',
    tiktok: {
      placeholder: 'Please enter content...',
      generateBtn: 'Generate',
      copyBtn: 'Copy',
      downloadBtn: 'Download',
    },
    weiyan: {
      placeholder: 'Enter the text you want to convert...',
      generateBtn: 'Generate',
      copyBtn: 'Copy Content',
      downloadBtn: 'Download Result',
    },
    imageSearch: {
      uploadTitle: 'Upload Image',
      dragText: 'Drag and drop image here or click to upload',
      uploadBtn: 'Select Image',
      searchBtn: 'Start Search',
    },
    createAudio: {
      placeholder: 'Enter the text for voice conversion...',
      generateBtn: 'Generate Voice',
      playBtn: 'Play',
      downloadBtn: 'Download Audio',
      voiceOptions: {
        male: 'Male Voice',
        female: 'Female Voice',
      },
    },
    videoLipSync: {
      uploadTitle: 'Upload Video',
      generateBtn: 'Generate Video',
      previewBtn: 'Preview',
      downloadBtn: 'Download Video',
    },
    poster: {
      UploadImage: 'Upload Image',
      CompanyGallery: 'Company Gallery',
      AddText: 'Add Text',
      PleaseEnterText: 'Please Enter Text',
      KeepAtLeastOne: 'Keep At Least One',
      delete: 'Delete',
      AddTextBox: 'Add Text Box',
      GenerateImages: 'Generate images',
      noneInput: 'Please enter text first',
      DownloadImages: 'Download images',
    },
    common: {
      loading: 'Loading...',
      success: 'Operation Successful',
      error: 'An Error Occurred',
      retry: 'Retry',
      cancel: 'Cancel',
      confirm: 'Confirm',
    },
  },
}
